using System;
using System.Globalization;
using System.Windows.Data;
namespace MicroMsg.UI.UserContrl
{
	internal class UnreadConverter : IValueConverter
	{
		public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
		{
			int num = (int)value;
			if (num <= 0)
			{
				return null;
			}
			if (num >= 100)
			{
				return "99+";
			}
			return string.Concat(num);
		}
		public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
		{
			throw new NotSupportedException();
		}
	}
}
